<?php

use wechat\assets\WechatAsset;

$imagesDir = WechatAsset::register($this)->baseUrl;
?>
<?php
$filename = __DIR__ . '/' . $type;
?>
<div id="mkdoc">
    <?php if (file_exists($filename . '.php')) {
        include $filename . '.php';
    } elseif (file_exists($filename . '.md')) { ?>
        <textarea id="content" style="display: none;"><?php include $filename . '.md' ?></textarea>
        <div id="result"></div>
    <?php } elseif (file_exists($filename)) {
        include $filename;
    } ?>
</div>
